#ifndef _TRADE_UI_H_
#define _TRADE_UI_H_

#include <base_ui.h>

class Scene;
class Trade ;
class TradeInfo ;
class Player ;
class NetStream ;

class TradeUI:public BaseUI
{
private:

	Scene* pScene;
	Trade* pTrade ;
	Player* pPlayer ;
	NetStream* pStream ;

	enum{LINE_H=40,LINE_ROW=1};
	enum{ITEM_COL=4,ITEM_ROW=4};
	enum{TEXT_H =20,TEXT_W=9,TEXT_COL=3,TEXT_ROW=1};

	int tradeType;

	int itemPos;

#ifdef _OGRE_3D_
	ImageInfo* vpInfo[20] ;
	ImageInfo* vpInfo1[20] ;
	TextOverlay* pTextName ;
	TextOverlay* pTextMoney ;
#endif

public:
	TradeUI () ;

	void init (NetStream*,Scene* ps, Player*, Trade*) ;

#ifdef _OGRE_3D_
	void updateIcon() ;
	void updateInfo(TradeInfo& trInfo, int tx, int ty) ;
#endif
	void beClick (int, int,KeyMan& keyMan) ;

	void draw (HDC hdc) ;

	void draw (HDC hdc, TradeInfo& info, int tx, int ty) ;
} ;

#endif